package com.efast.cafe.framework.bean;

public class ResultBean{
	
	public static final String ERROR_CODE_SYSTEM="SYSTEM_ERROR";//系统异常
	public static final String ERROR_CODE_REPEAT="DATA_REPEAT";//数据重复
	public static final String ERROR_CODE_PARAMETER="PARAM_ERROR";//参数错误

	public boolean success;
	
	public String message;
	
	public String[] msgParams;
	
	public Object object; 
	
	public String errorCode;
	
	public long currentTime;
	
	public ResultBean(){
		
	}
	
	public ResultBean(boolean success){
		this.success=success;
		this.currentTime = System.currentTimeMillis();
	}

	public ResultBean(boolean success,String message){
		this.success=success;
		this.message=message;
		this.currentTime = System.currentTimeMillis();
	}
	
	public ResultBean(boolean success,String message,Object object){
		this.success=success;
		this.message=message;
		this.object=object;
		this.currentTime = System.currentTimeMillis();
	}
	
	public ResultBean(boolean success,String errorCode,String message,Object object){
		this.success=success;
		this.errorCode = errorCode;
		this.message=message;
		this.object=object;
		this.currentTime = System.currentTimeMillis();
	}
	
	public ResultBean(boolean success,Object object){
		this.success=success;
		this.object=object;
		this.currentTime = System.currentTimeMillis();
	}
	

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String[] getMsgParams() {
		return msgParams;
	}

	public void setMsgParams(String[] msgParams) {
		this.msgParams = msgParams;
	}

	

	
	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public long getCurrentTime() {
		return currentTime;
	}

	public void setCurrentTime(long currentTime) {
		this.currentTime = currentTime;
	}
	
	
}
